//
//  StatusViewModel.m
//  RACTest
//
//  Created by Apple on 2017/12/5.
//  Copyright © 2017年 LYKM. All rights reserved.
//

#import "StatusViewModel.h"
#import <MJExtension/MJExtension.h>
#import "Status.h"

@interface StatusViewModel ()

#pragma mark -- 引用的Model和ViewModel
/**   */
@property (nonatomic,strong) Status *status;

@end

@implementation StatusViewModel

- (instancetype)initWithData:(id)data {
    if (self = [super init]) {
        self.status = [Status mj_objectWithKeyValues:data];
    }
    return self;
}

#pragma mark -- 引用的Model和ViewModel的setter方法，转化后赋值给属性

- (void)setStatus:(Status *)status {
    if (!status) { return; }
    
    _status = status;
    
    self.time = _status.created_at;
    self.contentText = _status.text;
    self.nickName = _status.mid;
    self.imageURL = _status.profile_image_url;
    
//    [self.infoUpdate sendNext:nil];
}

#pragma mark -- 更新数据源的方法

#pragma mark -- 信号懒加载

@end

